from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np

#定义图像和三维格式坐标轴
fig = plt.figure()  #定义新的三维坐标轴
ax1 = plt.axes(projection='3d')

xd = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625],
[0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125],
[0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875,0.1875],
[0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25],
[0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125,0.3125],
[0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375,0.375],
[0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375,0.4375],
[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],
[0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625,0.5625],
[0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625,0.625],
[0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875,0.6875],
[0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75],
[0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125,0.8125],
[0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875,0.875],
[0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375,0.9375],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]
yd = [[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1],
[0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1]]
zd = [[1,1.06445,1.13278,1.20491,1.2807,1.35994,1.44235,1.52757,1.61515,1.70455,1.79517,1.88628,1.97712,2.06681,2.15447,2.23912,2.31978],
[1.06449,1.16594,1.26252,1.35713,1.45097,1.54458,1.6381,1.73144,1.82433,1.91635,2.00693,2.09539,2.18089,2.26247,2.33894,2.40872,2.46939],
[1.13315,1.26375,1.38549,1.50118,1.61248,1.72028,1.82505,1.9269,2.02573,2.1212,2.21281,2.29989,2.38158,2.45683,2.52433,2.58237,2.62865],
[1.20623,1.3613,1.50517,1.64016,1.76788,1.8894,2.00533,2.11595,2.22125,2.32098,2.4147,2.50174,2.58123,2.65211,2.71304,2.76239,2.79818],
[1.28403,1.46037,1.62382,1.77629,1.91928,2.05386,2.18073,2.30025,2.4125,2.5173,2.6142,2.70258,2.78155,2.85006,2.9068,2.95024,2.97865],
[1.36684,1.56199,1.74288,1.91116,2.06822,2.21513,2.35263,2.48113,2.60077,2.71139,2.81258,2.9037,2.98388,3.05204,3.10689,3.147,3.17076],
[1.45499,1.66688,1.8633,2.04581,2.21576,2.37421,2.52197,2.65948,2.78692,2.90414,3.01075,3.10607,3.18921,3.25907,3.31435,3.35359,3.37526],
[1.54883,1.77552,1.98567,2.18085,2.36246,2.53165,2.68925,2.83579,2.97143,3.09606,3.20925,3.3103,3.39824,3.47192,3.52995,3.57083,3.59294],
[1.64872,1.88826,2.11026,2.31648,2.50848,2.68752,2.85453,3.01007,3.15435,3.28723,3.40825,3.51663,3.61134,3.69107,3.75433,3.79945,3.82467],
[1.75505,2.00527,2.23707,2.45254,2.65351,2.84142,3.01733,3.18187,3.33525,3.47729,3.60748,3.72495,3.82853,3.91676,3.98793,4.04014,4.07134],
[1.86825,2.12657,2.36577,2.58842,2.79673,2.99243,3.17669,3.3502,3.51318,3.66539,3.80623,3.93471,4.04949,4.14891,4.23099,4.29347,4.33391],
[1.98874,2.25199,2.49563,2.72298,2.93677,3.13901,3.33101,3.5135,3.68665,3.85016,4.00329,4.14491,4.2735,4.38715,4.48353,4.55997,4.61343],
[2.117,2.38105,2.6254,2.85446,3.07154,3.27893,3.47805,3.66957,3.85357,4.02964,4.1969,4.35404,4.49935,4.63065,4.74526,4.83996,4.91097],
[2.25353,2.51277,2.75306,2.98019,3.19808,3.40917,3.61479,3.8155,4.0112,4.20128,4.3847,4.55999,4.72525,4.87807,5.01544,5.13357,5.2277],
[2.39888,2.64531,2.87534,3.0963,3.31236,3.52572,3.73742,3.94766,4.15608,4.36183,4.56368,4.75998,4.94872,5.12735,5.29267,5.44046,5.56486],
[2.55359,2.77496,2.98694,3.19723,3.40902,3.62359,3.84124,4.06166,4.28409,4.50741,4.73015,4.95054,5.16648,5.37546,5.57444,5.75934,5.92376],
[2.71828,2.89348,3.07922,3.27528,3.48129,3.69669,3.92071,4.15236,4.39042,4.63345,4.87977,5.12744,5.37436,5.61818,5.85645,6.08655,6.30581]
]

ax1.scatter3D(xd,yd,zd)
ax1.set_xlabel('X', color='b')
ax1.set_ylabel('Y', color='g')
ax1.set_zlabel('Z', color='r')
plt.draw()
plt.savefig('16.png')
plt.show()
